(* SHIL substring *)
let subString inputString startInd endInd =
	String.sub inputString startInd ((endInd - startInd) + 1);;
	
(* SHIL stringLength *)
let stringLength inputString =
	String.length inputString;;

(* SHIL stringFind *)
let stringFind inputString searchString = 
	(Str.search_forward (Str.regexp searchString) inputString 0);;
	
(* Helper method to StringFindAll*)
let rec stringFindAllHelper inputString searchString index indexList = 
		try 
			let currIndex = (Str.search_forward (Str.regexp searchString) inputString index) in 
			(stringFindAllHelper inputString searchString (currIndex + (String.length searchString))  (currIndex::indexList)) 
		with Not_found -> (Array.of_list (List.rev indexList));; (*Flips order to ascending and creates array*)
		
	
(* SHIL stringFindAll*)	
let stringFindAll inputString searchString = 
	(stringFindAllHelper inputString searchString 0 []);;

(* SHIL stringSplit*)	
let splitString delimString inputString  = 
	(Array.of_list (Str.split (Str.regexp delimString) inputString));;

(* SHIL stringReplace*)	
let stringReplace searchString replaceString inputString = 
	(Str.global_replace (Str.regexp searchString) replaceString inputString);;	

(* SHIL stringToUpper*)		
let stringToUpper inputString = 
		(String.uppercase inputString);;
	
(* SHIL stringToLower*)		
let stringToLower inputString = 
		(String.lowercase inputString);;
		
(*Delim *)		
let html_parse parseString = 
		Array.map
      (function
         | Str.Delim c -> c
         | Str.Text c -> c) (Array.of_list(Str.full_split (Str.regexp "<[^>]*>") parseString ));;